<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue-监听</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>

<div id="app">
    <div v-bind:class="{'active':isActive}"></div>
    <!-- 等于<div class="active"></div>-->
</div>



</body>
<style>
.active {
    width: 100px;
    height: 100px;
    background: red;
}
</style>


<script>
new Vue({
    el:'#app',
    data:{
        isActive:true
    }
})
</script>
</html>